package com.dyh.quickdemozwei.avgDemo;

import java.util.Scanner;

public  class AvgInputCtrlConsole extends AvgInputCtrl{
    public Scanner scanner;

    @Override
    public AvgInput getInput() {

        String val = scanner.nextLine();

        AvgInput avgInput = new AvgInput();
        if (val==null || val.length()<=0){
            avgInput.type = AvgInput.Type.Next;
        }
        else {
            avgInput.type = AvgInput.Type.Choose;
            avgInput.val = val;
        }

        return avgInput;
    }
}
